﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SkypeStudio.Framework;

namespace SkypeStudio.Controls.Model
{

    public enum OnlineStatus
    {
        olsUnknown = -1,
        olsOffline = 0,
        olsOnline = 1,
        olsAway = 2,
        olsNotAvailable = 3,
        olsDoNotDisturb = 4,
        olsSkypeOut = 5,
        olsSkypeMe = 6,
    }
    public class Contact : NotifyPropertyChangedBase
    {
        public string About { get; set; }
        public string Aliases { get; set; }
        public DateTime Birthday { get; set; }
        //public TBuddyStatus BuddyStatus { get; set; }
        public bool CanLeaveVoicemail { get; set; }
        public string City { get; set; }
        public string Country { get; set; }
        public string CountryCode { get; set; }
        public string DisplayName { get; set; }
        public string FullName { get; set; }
        public string Handle { get; set; }
        bool HasCallEquipment { get; set; }
        public string Homepage { get; set; }
        public bool IsAuthorized { get; set; }
        public bool IsBlocked { get; set; }
        public bool IsCallForwardActive { get; set; }
        public bool IsSkypeOutContact { get; set; }
        public bool IsVideoCapable { get; set; }
        public string Language { get; set; }
        public string LanguageCode { get; set; }
        public DateTime LastOnline { get; set; }
        public string MoodText { get; set; }
        public int NumberOfAuthBuddies { get; set; }

        private OnlineStatus _OnlineStatus;
        public OnlineStatus OnlineStatus
        {
            get
            {
                return _OnlineStatus;
            }
            set
            {
                if (_OnlineStatus == value)
                    return;
                _OnlineStatus = value;
                NotifyOfPropertyChange(() => OnlineStatus);
                
            }
        }

        public string PhoneHome { get; set; }
        public string PhoneMobile { get; set; }
        public string PhoneOffice { get; set; }
        public string Province { get; set; }
        public string ReceivedAuthRequest { get; set; }
        //TUserSex Sex { get; }
        public string SpeedDial { get; set; }
        public int Timezone { get; set; }

        public string Name
        {
            get
            {

                return string.IsNullOrEmpty(Aliases) ? string.IsNullOrEmpty(FullName) ? string.IsNullOrEmpty(DisplayName) ? Handle : DisplayName : FullName : Aliases;
            }
        }
    }
}
